import request from '@/utils/request'

// 查询密集架列表
export function listShelves(query) {
  return request({
    url: '/deposit/shelves/list',
    method: 'get',
    params: query
  })
}

// 查询密集架详细
export function getShelves(shelvesId) {
  return request({
    url: '/deposit/shelves/' + shelvesId,
    method: 'get'
  })
}

// 新增密集架
export function addShelves(data) {
  return request({
    url: '/deposit/shelves',
    method: 'post',
    data: data
  })
}

// 修改密集架
export function updateShelves(data) {
  return request({
    url: '/deposit/shelves',
    method: 'put',
    data: data
  })
}

// 删除密集架
export function delShelves(shelvesId) {
  return request({
    url: '/deposit/shelves/' + shelvesId,
    method: 'delete'
  })
}

// 设置智能柜规格
export function updateColumnAndSection(data) {
  return request({
    url: '/deposit/shelves/updateColumnAndSection',
    method: 'post',
    data: data
  })
}

// 查询密集架列表
export function treeselectShelves(shelvesId) {
  return request({
	url: '/deposit/shelves/treeselectShelves/' + shelvesId,
    method: 'get'
  })
}

// 查询密集架列表所有
export function treeselectShelvesAll() {
  return request({
	url: '/deposit/shelves/treeselectShelvesAll',
    method: 'get'
  })
}